package server

import (
	"context"
	"grpc-gateway-demo/proto/pb"
)

type helloWorldService struct {
}

func NewHelloWorldService() *helloWorldService {
	return &helloWorldService{}
}

func (h *helloWorldService) SayHelloWorld(ctx context.Context, r *pb.HelloWorldRequest) (*pb.HelloWorldResponse, error) {
	return &pb.HelloWorldResponse{
		Message: r.GetName() + "说:你好呀",
	}, nil
}

func (h *helloWorldService) SayOK(ctx context.Context, r *pb.HelloWorldRequest) (*pb.HelloWorldResponse, error) {
	return &pb.HelloWorldResponse{
		Message: r.GetName() + "说:你好呀",
	}, nil
}
